<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <script>
  
  // function getFun1() {
  //   console.log(11)
  //   getFun2()
  //   console.log(`getFun1`)
  // }
  
  // function getFun2() {
  //   console.log(22)
    
  //   console.log(`123`)
  // }
  // getFun1()

      //闰年：year%4
      function judjeYear(year,month) {
        if(month==2){
          if((year%4==0)&&(year%100!=0)||(year%400==0)){
          console.log(`2月有29天`)
        }else{
          console.log(`2月有28天`)
        }
        }else{
          if(month==1||month==3||month==5||month==7||month==8||month==10||month==12){
            console.log(`${month}月有31天`)
          }else{
            console.log(console.log(`${month}月有30天`))
          }



        }
       
      }
      judjeYear(2024,8)
      judjeYear(2024,2)
      judjeYear(2024,6)
  </script>
</body>
</html>